home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / Balloons.a < prev    next >
Encoding:
Text File  |  1993-11-30  |  8.9 KB  |  271 lines  |  [TEXT/MPS ]

  1. ;    File:        Balloons.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGBALLOONS__') = 'UNDEFINED' THEN
  12. __INCLUDINGBALLOONS__    SET    1
  13.  
  14.     IF &TYPE('__INCLUDINGTRAPS__') = 'UNDEFINED' THEN
  15.     INCLUDE 'Traps.a'
  16.     ENDIF
  17.  
  18.                         TITLE        'Balloons.a - Help Manager'
  19. ;
  20. ;___________________________________________________________________________________________________________
  21. ;
  22. hmBalloonHelpVersion    EQU     2            ;  The real version of the Help Manager 
  23. ;
  24. ;    Help Mgr Error Codes in range: -850 to -874
  25. ;
  26. hmHelpDisabled            EQU        -850        ; Show Balloons mode was off, call to routine ignored
  27. hmBalloonAborted        EQU        -853        ; Returned if mouse was moving or mouse wasn't in window port rect
  28. hmSameAsLastBalloon        EQU        -854        ; Returned from HMShowMenuBalloon if menu & item is same as last time
  29. hmHelpManagerNotInited    EQU        -855        ; Returned from HMGetHelpMenuHandle if help menu not setup 
  30. hmSkippedBalloon        EQU        -857        ; Returned from calls if helpmsg specified a skip balloon 
  31. hmWrongVersion            EQU        -858        ; Returned if help mgr resource was the wrong version 
  32. hmUnknownHelpType        EQU        -859        ; Returned if help msg record contained a bad type 
  33. hmOperationUnsupported    EQU        -861        ; Returned from HMShowBalloon call if bad method passed to routine 
  34. hmNoBalloonUp            EQU        -862        ; Returned from HMRemoveBalloon if no balloon was visible when call was made 
  35. hmCloseViewActive        EQU        -863        ; Returned from HMRemoveBalloon if CloseView was active
  36. ;
  37. kHMHelpMenuID            EQU        -16490        ; Resource ID and menu ID of help menu
  38. kHMAboutHelpItem        EQU        1            ; help menu item number of About Balloon Help…
  39. kHMShowBalloonsItem        EQU        3            ; help menu item number of Show/Hide Balloons
  40. ;
  41. kHMBalloonHelpID        EQU        -5696        ; ID of various Help Mgr package resources (in Pack14 range) 
  42. kHMBalloonWDEFID        EQU        126            ; Resource ID of the WDEF proc used in standard balloons 
  43. ;
  44. helpItem                EQU        1            ; key value in DITL template that corresponds to the help item
  45. ;
  46. ;    Options for Help Manager resources in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources
  47. ;
  48. hmDefaultOptions        EQU        0            ; default options for help manager resources
  49. hmUseSubID                EQU        1            ; treat resID's in resources as subID's of driver base ID (for Desk Accessories)
  50. hmAbsoluteCoords        EQU        2            ; ignore window port origin and treat rectangles as absolute coords (local to window) 
  51. hmSaveBitsNoWindow        EQU        4            ; don't create a window, just blast bits on screen. No update event is generated
  52. hmSaveBitsWindow        EQU        8            ; create a window, but restore bits behind window when window goes away & generate update event
  53. hmMatchInTitle            EQU        16            ; for hwin resources, match string anywhere in window title string
  54. ;
  55. ;    Constants for Help Types in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources
  56. ;
  57. kHMStringItem            EQU        1            ; pstring used in resource
  58. kHMPictItem                EQU        2            ; 'PICT' ResID used in resource
  59. kHMStringResItem        EQU        3            ; 'STR#' ResID & index used in resource
  60. kHMTEResItem            EQU        6            ; Styled Text Edit ResID used in resource ('TEXT' & 'styl')
  61. kHMSTRResItem            EQU        7            ; 'STR ' ResID used in resource
  62. kHMSkipItem                EQU        256            ; don't display a balloon
  63. kHMCompareItem            EQU        512            ; Compare pstring in menu item w/ PString in resource item ('hmnu' only)
  64. kHMNamedResourceItem    EQU        1024        ; Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only)
  65. kHMTrackCntlItem         EQU        2048        ; Reserved
  66. ;
  67. ;    Constants for hmmHelpType's when filling out HMMessageRecord
  68. ;
  69. khmmString                EQU        1            ; help message contains a PString
  70. khmmPict                EQU        2            ; help message contains a resource ID to a 'PICT' resource
  71. khmmStringRes            EQU        3            ; help message contains a res ID & index to a 'STR#' resource
  72. khmmTEHandle            EQU        4            ; help message contains a Text Edit handle
  73. khmmPictHandle            EQU        5            ; help message contains a Picture handle
  74. khmmTERes                EQU        6            ; help message contains a res ID to 'TEXT' & 'styl' resources
  75. khmmSTRRes                EQU        7            ; help message contains a res ID to a 'STR ' resource
  76. ;
  77. ;    ResTypes for Styled TE Handles when extracting from Resources
  78. ;
  79. kHMTETextResType        EQU        'TEXT'        ; Resource Type of text data for styled TE record w/o style info
  80. kHMTEStyleResType        EQU        'styl'        ; Resource Type of style information for styled TE record
  81.  
  82. ;    Generic defines for the state parameter used when extracting 'hmnu' & 'hdlg' messages
  83. ;
  84. kHMEnabledItem            EQU        0            ; item is enabled, but not checked or control value EQU 0
  85. kHMDisabledItem            EQU        1            ; item is disabled, grayed in menus or disabled in dialogs
  86. kHMCheckedItem            EQU        2            ; item is enabled, and checked or control value EQU 1
  87. kHMOtherItem            EQU        3            ; item is enabled, and control value > 1
  88. ;
  89. ;    Resource Types for whichType parameter used when extracting 'hmnu' & 'hdlg' messages
  90. ;
  91. kHMMenuResType            EQU        'hmnu'        ; ResType of help resource for supporting menus
  92. kHMDialogResType        EQU        'hdlg'        ; ResType of help resource for supporting dialogs
  93. kHMWindListResType        EQU        'hwin'        ; ResType of help resource for supporting windows
  94. kHMRectListResType        EQU        'hrct'        ; ResType of help resource for rectangles in windows
  95. kHMOverrideResType        EQU        'hovr'        ; ResType of help resource for overriding system balloons
  96. kHMFinderApplResType    EQU        'hfdr'        ; ResType of help resource for custom balloon in Finder
  97. ;
  98. ;    Method parameters to pass to HMShowBalloon    
  99. ;
  100. kHMRegularWindow        EQU        0            ; Create a regular window floating above all windows    
  101. kHMSaveBitsNoWindow        EQU        1            ; Just save the bits and draw (for MDEF calls
  102. kHMSaveBitsWindow        EQU        2            ; Regular window, save bits behind, AND generate update event
  103. ;
  104. ;    help message structure (offsets into help message record)
  105. ;
  106. hmmHelpType                EQU     0
  107. hmmHelpMessage            EQU        2
  108. hmmHMSize                EQU        4 + 256        ; HMMessageRecord worse case size
  109. ;
  110. ;    help message size
  111. ;
  112. khmmMsgSize                EQU        256 + 2        ; max pstring + type integer
  113. ;
  114. ;
  115. ;___________________________________________________________________________________________________________
  116. ;
  117. ;    Package selectors for Help Manager Package
  118. ;
  119. kHMGetHelpMenuHandle    EQU        $0200            ; 2 words of parameters
  120. kHMShowBalloon            EQU        $0B01            ; 11 words of parameters
  121. kHMRemoveBalloon        EQU        $0002            ; 0 words of parameters
  122. kHMGetBalloons            EQU        $0003            ; 0 words of params    (Note: doesn't load package!)
  123. kHMSetBalloons            EQU        $0104            ; 1 word of parameters
  124. kHMShowMenuBalloon        EQU        $0E05            ; 14 words of parameters
  125. kHMGetIndHelpMsg        EQU        $1306            ; 19 words of parameters    <12>
  126. kHMIsBalloon            EQU        $0007            ; 0 words of parameters
  127. kHMSetFont                EQU        $0108            ; 1 word of parameters
  128. kHMSetFontSize            EQU        $0109            ; 1 word of parameters
  129. kHMGetFont                EQU        $020A            ; 2 words of parameters
  130. kHMGetFontSize            EQU        $020B            ; 2 words of parameters
  131. kHMSetDialogResID        EQU        $010C            ; 1 words of parameters
  132. kHMSetMenuResID            EQU        $020D            ; 2 words of parameters
  133. kHMBalloonRect            EQU        $040E            ; 4 words of parameters
  134. kHMBalloonPict            EQU        $040F            ; 4 words of parameters
  135. kHMScanTemplateItems    EQU        $0410            ; 4 words of parameters
  136. kHMExtractHelpMsg        EQU        $0711            ; 7 words of parameters
  137. kHMFillCitationString    EQU        $0512            ; 5 words of parameters
  138. kHMGetDialogResID        EQU        $0213            ; 2 words of parameters
  139. kHMGetMenuResID            EQU        $0314            ; 3 words of parameters
  140. kHMGetBalloonWindow        EQU        $0215            ; 2 words of parameters
  141. ;
  142. ;___________________________________________________________________________________________________________
  143. ;
  144. ;    Help Manager interface macros
  145. ;
  146.         macro
  147.             _HMGetHelpMenuHandle
  148.             MOVE.W    #kHMGetHelpMenuHandle,D0
  149.             _Pack14    
  150.         endm
  151.         
  152.         macro
  153.             _HMShowBalloon
  154.             MOVE.W    #kHMShowBalloon,D0
  155.             _Pack14    
  156.         endm
  157.  
  158.         macro
  159.             _HMRemoveBalloon
  160.             MOVE.W    #kHMRemoveBalloon,D0
  161.             _Pack14    
  162.         endm
  163.         
  164.         macro
  165.             _HMGetBalloons
  166.             MOVE.W    #kHMGetBalloons,D0
  167.             _Pack14    
  168.         endm
  169.  
  170.         macro
  171.             _HMSetBalloons
  172.             MOVE.W    #kHMSetBalloons,D0
  173.             _Pack14    
  174.         endm
  175.         
  176.         macro
  177.             _HMShowMenuBalloon
  178.             MOVE.W    #kHMShowMenuBalloon,D0
  179.             _Pack14    
  180.         endm
  181.  
  182.         macro
  183.             _HMGetIndHelpMsg
  184.             MOVE.W    #kHMGetIndHelpMsg,D0
  185.             _Pack14    
  186.         endm    
  187.         
  188.         macro
  189.             _HMIsBalloon
  190.             MOVE.W    #kHMIsBalloon,D0
  191.             _Pack14    
  192.         endm
  193.  
  194.         macro
  195.             _HMSetFont
  196.             MOVE.W    #kHMSetFont,D0
  197.             _Pack14    
  198.         endm
  199.         
  200.         macro
  201.             _HMGetFont
  202.             MOVE.W    #kHMGetFont,D0
  203.             _Pack14    
  204.         endm
  205.         macro
  206.             _HMGetFontSize
  207.             MOVE.W    #kHMGetFontSize,D0
  208.             _Pack14    
  209.         endm
  210.         
  211.         macro
  212.             _HMSetDialogResID
  213.             MOVE.W    #kHMSetDialogResID,D0
  214.             _Pack14    
  215.         endm
  216.  
  217.         macro
  218.             _HMSetMenuResID
  219.             MOVE.W    #kHMSetMenuResID,D0
  220.             _Pack14    
  221.         endm
  222.         
  223.         macro
  224.             _HMBalloonRect
  225.             MOVE.W    #kHMBalloonRect,D0
  226.             _Pack14    
  227.         endm
  228.         
  229.         macro
  230.             _HMBalloonPict
  231.             MOVE.W    #kHMBalloonPict,D0
  232.             _Pack14    
  233.         endm
  234.         
  235.         macro
  236.             _HMScanTemplateItems
  237.             MOVE.W    #kHMScanTemplateItems,D0
  238.             _Pack14    
  239.         endm
  240.         
  241.         macro
  242.             _HMExtractHelpMsg
  243.             MOVE.W    #kHMExtractHelpMsg,D0
  244.             _Pack14    
  245.         endm
  246.         
  247.         macro
  248.             _HMFillCitationString
  249.             MOVE.W    #kHMFillCitationString,D0
  250.             _Pack14    
  251.         endm
  252.         
  253.         macro
  254.             _HMGetDialogResID
  255.             MOVE.W    #kHMGetDialogResID,D0
  256.             _Pack14    
  257.         endm
  258.  
  259.         macro
  260.             _HMGetMenuResID
  261.             MOVE.W    #kHMGetMenuResID,D0
  262.             _Pack14    
  263.         endm
  264.         
  265.         macro
  266.             _HMGetBalloonWindow
  267.             MOVE.W    #kHMGetBalloonWindow,D0
  268.             _Pack14    
  269.         endm
  270.  
  271.     ENDIF    ; ...already included